<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        'use strict'; //开启严格模式
    </script>
    <script>
        //为整个script开启严格模式
        (function() {
            'use strict';
        })();
    </script>
    <script>
        //为某个函数开启严格模式
        function fn() {
            'use strict';

        };

        function fun() {

        };
    </script>
</body>

</html>